<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<jsp:include page="/product/include/base_product_pre_part.jsp"></jsp:include>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/category.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/category.js">
</script>
<script type="text/javascript">
<!--
 category_url = "<%=request.getContextPath()%>/categories.do";
//-->
</script>
<form action="<%=request.getContextPath()%>/order/.do" method="post">
	<s:hidden name="target" />
	<s:hidden name="id" value="%{product.id}" />
	<s:if test="product!=null">
		<s:text name="'product'" />:<s:property value="product.name" />
		<script type="text/javascript">
		<!--
		$(document).ready(function () {
			<s:set name="preId" value=""/>
			<s:iterator value="product.category.chainIds" status="status">
				<s:if test="#status.first">
					category.load(<s:property value="#status.index+1"/>,null,"<s:property value="top"/>");
				</s:if>
				<s:else>
					category.load(<s:property value="#status.index+1"/>,"id=<s:property value="#preId"/>","<s:property value="top"/>");
				</s:else>
				<s:set name="preId" value="top"/>
			</s:iterator>
		});
		//-->
		</script>
	</s:if>
	<s:else>
		<script type="text/javascript">
		<!--
		$(document).ready(function () {
			category.load(1);
		});
		//-->
		</script>
	</s:else>

	<div id="container" class="box">
		<div id="cascadeList">
			<ol>
			</ol>
		</div>
		<div class="show_selected">
			<input type="hidden" name="category_id" id="category_id" />
			Currently selected:
			<span id="showContainer"></span>
		</div>
		<div>
			<input type="submit" id="submit_selected" value="OK" />
		</div>
	</div>
</form>
<jsp:include page="/product/include/base_product_last_part.jsp"></jsp:include>